qrcode_bitmap Function

Syntax

B blobOrString = qrcode_bitmap(C text [,C correctionLevel [,N width [,N height [,L flagBase64encodedWithPrefix ]]]])

C blobOrString = qrcode_bitmap(C text [,C correctionLevel [,N width [,N height [,L flagBase64encodedWithPrefix ]]]])

Arguments

textCharacter

Character

correctionLevelCharacter

Character. Default is 'M'

Correction level can be L, M, Q or H (L=7%, M=15%, Q=25%, H=30%). See QRCode Namespace for more information.

widthNumeric

Width of bitmap in pixels

height

Height of bitmap in pixels. If .t. then return a base64 encoded string with the 'data:image/png;base64,' prefix

flagBase64encodedWithPrefixLogical

If .t. then return a base64 encoded string with the 'data:image/png;base64,' prefix

Returns

blobOrStringBinary Character

Returns a QR Code image in PNG file format. If base64Encode was set to .t., the returned data will be a character string containing the QR Code as a base64 encoded value.

If base64Encode was set to .f. (the default), the returned data will be a blob containing the PNG image binary.

Description

Generates a qrcode image. Returns either binary PNG data or base64 encoded string with 'data:image/png;base64,' prefix

Discussion

Generates a bitmap of a QR Code - This function is a wrapper for the ::QRCode::Creator::GeneratePng function. However, it is able to scale the bitmap to an explicit size.

dim qrcode as b = qrcode_bitmap("Hello World","M",300,300)

qrcode_bitmap() can be used to create QR Codes in reports. To embed a calculated field directly into the report that contains a QR Code image generated using this function, you must convert the PNG binary to mime object:

qrcodeCalcField = *mime_object("PNG",qrcode_bitmap("Hello World","M",300,300))

See also the printQRCode() Function.